import './../sass/register.scss';
import $ from './jquery.min.js';
$(() => {
    $("#btn-register").on('click',function() {
        const username = $("#username").val();
        const password = $("#password").val();
        $.ajax({
            url: '/Users/register',
            data: {
                username,
                password
            },
            type: 'post',
            success({message,status}) {
                console.log(message);
                if (status == 200) {
                    alert(message);
                }else{
                    alert("该用户名已被注册~");
                }
            }
        })
    })
})